public class text {
    public static String myToString(int[] Array) {
        String str = "[";
        for (int i = 0; i < Array.length; i++) {
            str += Array[i];
            if(i < Array.length + 1) {
                str += ",";
            }
        }
        str += "]";
        return str;
    }

    public static void main(String[] args) {
        int[] Array = {1, 2, 3, 4};
        String ret = myToString(Array);
        System.out.println(ret);
    }
}
